<li class="product_list">
  <div style="float:left;">
    <%= render :partial =>'/products/product_detail',:object=>product_li%>
  </div>

  <div class="text_box">
    <div class="description">
      <% if product_li.description %>
        <%=format_desc(product_li.description)%>
      <%end%>
    </div>
    <a href="javascript:void(0);" onclick="addToCart(<%=product_li.id%>);" >
      <img src="/images/add_to_cart.gif" alt="加入购物车" />
    </a>
    <div class="link">
      <% if admin? %>
        <%= link_to '编辑', [:edit,product_li],:class=>'action_edit' %>
        <%= link_to '删除',[product_li], :confirm => 'Are you sure?', :method => :delete,:class=>'action_delete' %>
      <% end %>
    </div>
  </div>
</li>

<li class="break_line">
</li>